
# generate table B1

# load packages
library(rio) # load data
library(tidyverse) # data manipulation
library(stargazer) # generate tables

# set working directory
setwd("~/replication_files/")

# load data for analysis
data_with_dictionary <- import("data/full_data.csv") %>%
  dplyr::select(policy_passage, previous_policy, 
         article_iv_promotes_governance,
         resource_mentions_absolute, resource_mentions_tfidf,
         grad_school_econ_usa, fdi_performance_index_lag,
         imf_program, price_crudeoil_lag, price_crudeoil_difference, 
         resource_rents_lag, log_gdp_per_capita_lag, gdp_growth_lag, field_discovery_lag, 
         polyarchy, left_executive, protest, year)

# generate table B1
stargazer(data_with_dictionary, covariate.labels = c("Policy Passage","Previous Policy Passage",
                                                "Consultation Promotes Natural Resource Governance",
                                                "Natural Resource Term Frequency", "Natural Resource Term Frequency (TF--IDF)",
                                                "Technocratic Finance Minister","FDI Performance Index","IMF Program","Crude Oil Price","Crude Oil Price, Delta",
                                                "Resource Rents", "Log GDP Per Capita","GDP Growth","Field Discovery","Polyarchy","Left Executive","Protest Count","Year"))

